<template>
  <el-aside width="200px" class="aside">
    <el-menu :default-active="route.path" class="el-menu-vertical-demo" router>
      <el-menu-item class="menu" index="/index">
        <el-icon><House /></el-icon>
        <span>{{ title }}</span>
      </el-menu-item>
      <NavItem v-for="v in items" :key="v.webUrl" :item="v" :base-path="v.webUrl" />
    </el-menu>
  </el-aside>
</template>

<script setup>
import { ref } from "vue";
import NavItem from './navItem.vue'
import store from "../../store/index.js";
import { useRoute, useRouter } from "vue-router";

const route = useRoute();
const router = useRouter();
const menuList = store().$state.menuList;
const items = ref(menuList); //菜单列表

const title = ref("控制台");

</script>